package com.shadow.mall.order.remote;


import com.shadow.mall.common.core.JsonResult;

import com.shadow.mall.pay.domain.dto.PayOrderDTO;
import com.shadow.mall.pay.domain.request.PayOrderRequest;
import com.shadow.mall.pay.domain.request.PayRefundRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 支付服务远程接口
 *
 */
@Component
@FeignClient("shadow-mall-pay")
public interface PayService {


    /**
     * 调用支付系统进行预支付下单
     * @param payOrderRequest
     */

    @PostMapping("pay/payOrder")
    JsonResult<PayOrderDTO> payOrder(PayOrderRequest payOrderRequest);

    @PostMapping("pay/refund")
    JsonResult<Boolean> executeRefund(PayRefundRequest payRefundRequest);
}